package ssw.gui;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.util.SortedSet;

import javax.swing.JLabel;
import javax.swing.JPanel;

import ssw.game.GameState;

public class InputPanel extends JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 7604396465456743998L;
	
	private final JLabel lblTiles = new JLabel("");
	private final JLabel lblGuesses = new JLabel("");
	
	public InputPanel()  {
		super(new GridBagLayout());
		
		GridBagConstraints gbc = new GridBagConstraints();
		add(new JLabel("Tiles: "), gbc);
		
		gbc = new GridBagConstraints();
		gbc.gridx = 1;
		add(lblTiles, gbc);
		
		gbc = new GridBagConstraints();
		gbc.gridy = 1;
		add(new JLabel("Guesses: "), gbc);
		
		gbc = new GridBagConstraints();
		gbc.gridx = 1;
		gbc.gridy = 1;
		add(lblGuesses, gbc);
	}
	
	public void setup(GameState state, SortedSet<String> guesses)  {
		lblTiles.setText(state.getTiles().toString());
		lblGuesses.setText(guesses.toString());
	}
}
